<?php

/**
 * 交易模型，可以生成对应的模型单号
 */
class TransModel extends CommonModel {

    //protected $type = $this->getModelName();

    protected $_auto = array(
        array('create_time','intime',1,'callback'),
        array('update_time','time',2,'function'),
    );

    public function getNO(){
        return $this->genManNo($this->getModelName());
    }

    public function intime($strtime){
    	return empty($strtime)?time():strtotime($strtime);
    }

    public function getmano($mano){
        return empty($mano)?$this->getNO():$mano;
    }

}
?>
